local zsetKey = "chat_group:group_users:groupID_" .. ARGV[1]
local firstTimestamp = tonumber(ARGV[2])
local secondTimestamp = tonumber(ARGV[3])
local args = {}
for i = 1, #KEYS do
    if i == 1 then
        table.insert(args, firstTimestamp)
    else
        table.insert(args, secondTimestamp)
    end
    table.insert(args, KEYS[i])
    local newKey1 = "chat_group:user_group_list:ID_" .. KEYS[i]
    local newKey2 = "chat_group:user_group_object:ID_" .. KEYS[i] .. ":" .. ARGV[1]
    redis.call('ZADD', newKey1, firstTimestamp,ARGV[1])
    redis.call('HSET', newKey2, 'content', ARGV[4])
    redis.call('HSET', newKey2, 'tip', ARGV[5])
    redis.call('HSET', newKey2, 'time', ARGV[6])
end
redis.call('ZADD', zsetKey, unpack(args))